package models

import "github.com/astaxie/beego/orm"

type PqTestArea struct {
	Id int
	Pid int
	Name string
	Lft int
	Rgt int
	TabCategoryId string
	BaseModel
}

func (pta PqTestArea) List(q ...interface{}) ([]orm.Params,interface{}){
	var areas []orm.Params
	model := GetSlaveDb()
	_, _ = model.Raw(`select * from pq_test_area`, q).Values(&areas)
	var maps []orm.Params
	_, _ = model.Raw("select count(*) as amount from pq_test_area").Values(&maps)
	return areas,maps[0]["amount"]
}


func (pta PqTestArea) Create(){

}
